package com.hcz.client;

import com.hcz.client.fallback.UserClientFallback;
import com.hcz.config.FeignConfig;
import com.hcz.pojjo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignLoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author hcz
 * @describtion TODO
 * @date 2019-06-21 16:16
 */
@FeignClient(value = "user-service",fallback = UserClientFallback.class,configuration = FeignConfig.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    String getUser(@PathVariable("id")Long id);
    //http://user-service/user/id   -->String -->Get
}
